package io.github.qifan777.server.wallet.order.entity;

import io.github.qifan777.server.infrastructure.jimmer.BaseEntity;
import io.github.qifan777.server.order.entity.BaseOrder;
import io.github.qifan777.server.wallet.pack.WalletPackage;
import io.qifan.infrastructure.generator.core.GenAssociationField;
import io.qifan.infrastructure.generator.core.GenEntity;
import org.babyfish.jimmer.sql.DissociateAction;
import org.babyfish.jimmer.sql.Entity;
import org.babyfish.jimmer.sql.ManyToOne;
import org.babyfish.jimmer.sql.OnDissociate;

@GenEntity
@Entity
public interface WalletOrder extends BaseEntity {
    @OnDissociate(DissociateAction.DELETE)
    @GenAssociationField(label = "基础订单", order = 0, prop = "baseOrderId")
    @ManyToOne
    BaseOrder baseOrder();

    @GenAssociationField(label = "钱包套餐", order = 1, prop = "walletPackageId")
    @ManyToOne
    WalletPackage walletPackage();
}
